//
//  MusicModel.m
//  product_B
//
//  Created by zyc on 16/5/28.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "MusicModel.h"

@implementation MusicModel

- (instancetype)init{
    self = [super init];
    if (self) {
        _author = [[MusicAuthorModel alloc] init];
        _stroyAuthor = [[MusicAuthorModel alloc] init];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"id"]) {
        _myID = value;
    }
}

- (void)setValue:(id)value forKey:(NSString *)key{
    if ([key isEqualToString:@"author"]) {
        [_author setValuesForKeysWithDictionary:value];
    }else if ([key isEqualToString:@"story_author"]){
        [_stroyAuthor setValuesForKeysWithDictionary:value];
    }
    else{
        [super setValue:value forKey:key];
    }
}




@end
